Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
Next.js i18n dynamic links with /lang/slug/[id] get error 404

When i trying go to /en/vacancies/13 page - getting 404 error
My project looks like - pages/vacancies/[id] file.
If i not use i18n just go to /vacancies/1 - if it is default lang i dont get error

export const getStaticPaths: GetStaticPaths<{ id: string }> = async () => {
    let paths;
    await axios.get(`https://career.tele2.kz/cms/vacancies`).then(response => {
        const prePaths = response.data.map((vacancy:any) => {
            const arr = [{ id: vacancy.id.toString(), locale: vacancy.locale }, ...vacancy.localizations];
            arr.map( (it) => {
                return {params: it}
            });
            return arr;
        });
        const merged = [].concat.apply([], prePaths);
        paths = merged.map( (item:any) => {
            return {params: {id: item.id.toString(), locale: item.locale}}
        })
    });
    return { paths, fallback: false }
};

this is my getStaticPaths.
My links looks like

<Link href={asPath} locale="kz"> // or any different locale

How can i solve this 404 error? i don't have directories in pages like en or kz

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!